package com.crm.system.service.coursearrange;

import com.crm.common.model.DhPageInfo;
import com.crm.model.entity.coursearrange.CourseArrange;
import com.crm.model.entity.courseregist.CourseRegistration;
import com.crm.model.qo.courseregist.*;
import com.crm.model.vo.courseregist.*;

import java.util.List;

public interface CourseArrangeService {


    /**
     * @Description: 获取课程管理列表
     * @Param: [pageIndex, pageSize]
     * @Author: lixq-f
     * @Date: 2021/4/25
    **/
    DhPageInfo<CourseArrange> getCourseManagerList(Integer pageIndex, Integer pageSize, CourseListQO courseListQO);


    /**
     * @Description: 获取课程列表
     * @Param: [pageIndex, pageSize, courseListQO]
     * @Return: com.crm.common.model.DhPageInfo<com.crm.model.vo.courseregist.CourseListVO>
     * @Author: lixq-f
     * @Date: 2021/5/11
    **/
    DhPageInfo<CourseListVO> getCourseList(Integer pageIndex, Integer pageSize,
                                           String sortName, String sortOrder,
                                           CourseListQO courseListQO);


    /**
     * @Description: 添加报名人
     * @Param: [regist]
     * @Return: java.lang.Boolean
     * @Author: lixq-f
     * @Date: 2021/4/26
     **/
    Boolean insert(CourseRegistQO registQO);


    /**
     * @Description: 更新报名人
     * @Param: [regist]
     * @Return: java.lang.Boolean
     * @Author: lixq-f
     * @Date: 2021/4/26
     **/
    Boolean update(EditCourseRegistQO registQO);


    /**
     * @Description: 根据主键获取课程报名人
     * @Param: [id]
     * @Return: com.crm.model.entity.courseregist.CourseRegistration
     * @Author: lixq-f
     * @Date: 2021/4/26
     **/
    CourseRegistVO selectCourseRegById(String id);


    /**
     * @Description: 用户取消报名
     * @Param: [registId, courseId]
     * @Return: java.lang.Boolean
     * @Author: lixq-f
     * @Date: 2021/7/21
     **/
    Boolean deleteById(String registId,String courseId);


    /**
     * @Description: 获取课程报名列表
     * @Return: DhPageInfo<CourseRegistVO>
     * @Author: lixq-f
     * @Date: 2021/4/26
     **/
    DhPageInfo<CourseRegistVO> selectCourseRegistList(Integer pageIndex, Integer pageSize,
                                                      String sortName, String sortOrder,
                                                      CourseRegistListQO registListQO);


    /**
     * @Description: 审核取消
     * @Param: [cancelVO]
     * @Return: java.lang.Boolean
     * @Author: lixq-f
     * @Date: 2021/6/9
    **/
    Boolean auditCancel(AuditCancelVO cancelVO);



    /**
     * @Description: 根据客户ID、课程ID获取报名人
     * @Param: [customerId, courseId]
     * @Return: com.crm.common.model.DataResponse
     * @Author: lixq-f
     * @Date: 2021/6/10
     **/
    List<CourseRegistration> getRegistByCourseIdAndCustomerId(String customerId, String courseId);


    /**
     * @Description: 一键划扣，扣次
     * @Param: [courseId, registList]
     * @Return: java.lang.Boolean
     * @Author: lixq-f
     * @Date: 2021/6/11
    **/
    Boolean courseConsume(CourseConsumeVO consumeVO);


    /**
     * @Description: 生成二维码
     * @Param: []
     * @Return: java.lang.String
     * @Author: lixq-f
     * @Date: 2021/7/12
    **/
    String generateQrCode();



    /**
     * @Description: 审核报名列表
     * @Param: [pageIndex, pageSize, sortName, sortOrder, registListQO]
     * @Return: com.crm.common.model.DataResponse
     * @Author: lixq-f
     * @Date: 2021/7/15
     **/
    DhPageInfo<AuditRegistListVO> selectAuditRegistList(Integer pageIndex, Integer pageSize,
                                                        String sortName, String sortOrder,
                                                        AuditRegistListQO registListQO);


    /**
     * @Description: 申请试听
     * @Param: [courseTryListenVO]
     * @Return: java.lang.Boolean
     * @Author: lixq-f
     * @Date: 2021/7/26
    **/
    Boolean addCourseTryListen(CourseTryListenVO courseTryListenVO);
}
